﻿using QMERP.Domain.Dtos;

namespace QMERP.Application.Services
{
    public interface IDictionaryService
    {
        /// <summary>
        /// 字典列表
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<PageResponse<DictionaryResponse>> Query(PageRequest<DictionaryRequest> request);
        /// <summary>
        /// 获取id的字典详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<DictionaryResponse> Detail(long id);
        /// <summary>
        /// 字典保存
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        /// <exception cref="ApiException"></exception>
        Task Save(DictionarySaveRequest request);
        /// <summary>
        /// 获取category的字典集合
        /// </summary>
        /// <param name="category"></param>
        /// <returns></returns>
        Task<List<DictionaryComboBoxItemResponse>> GetComboBox(string category);
        /// <summary>
        /// 获取组合列表(可用于下拉框,复选框,单选框)
        /// </summary>
        /// <returns></returns>
        Task<List<DictionaryComboBoxResponse>> GetComboBoxs();
    }
}
